package com.ctshk.rpc.order.tour.service;

import com.ctshk.common.dto.Result;
import com.ctshk.common.model.TokenUser;
import com.ctshk.rpc.order.tour.dto.custom.OrderBuyInsuranceDTO;
import com.ctshk.rpc.order.tour.dto.custom.OrderInsuranceDTO;
import com.ctshk.rpc.order.tour.dto.SeriesOrderCollectionCalculationDTO;
import com.ctshk.rpc.order.tour.dto.SeriesOrderCollectionListDTO;
import com.ctshk.rpc.order.tour.req.*;
import com.ctshk.rpc.order.tour.req.custom.*;

import java.util.List;

/**
 * <p>
 * 系列团游客收款 服务类
 * </p>
 *
 * @author 谭响
 * @since 2021-01-18
 */
public interface ISeriesOrderCollectionService {


    /**
     * 计算
     */
    Result<SeriesOrderCollectionCalculationDTO> calculation(SeriesOrderCollectionCalculationReq seriesOrderCollectionCalculationReq, TokenUser currentUser);

    /**
     * 列表
     */
    List<SeriesOrderCollectionListDTO> list(SeriesOrderTouristInfoDetailReq req);


    /**
     * 确认
     */
    Result confirm(SeriesOrderCollectionConfirmReq req);

    /**
     * 计算保险
     */
    Result calculationInsurance(SeriesOrderCollectionCalculationInsuranceReq req, TokenUser currentUser);

    /**
     * 验证优惠
     */
    Result verifyDiscount(SeriesOrderCollectionVerifyDiscountReq req);

    /**
     * 使用优惠
     */
    Result useDiscount(SeriesOrderCollectionUseDiscountReq req, TokenUser currentUser);

    /**
     * 使用积分
     */
    Result usePoints(SeriesOrderCollectionUsePointsReq req, TokenUser currentUser);

    /**
     * 使用积分计算
     */
    Result usePointsCalculation(SeriesOrderCollectionUsePointsCalculationReq req, TokenUser currentUser);

    /**
     * 驳回(内部接口)
     * @param collectionNumber 收款单号
     * @param rejectInfo 驳回信息
     * @param tokenUser
     * @return
     */
    Result<Long> reject(String collectionNumber, String rejectInfo, TokenUser tokenUser);
    
    /**
     * 确认收款(内部接口)
     * @param collectionNumber
     * @param tokenUser
     * @return
     */
    Result<Long> confirmCollection(String collectionNumber, TokenUser tokenUser);

    /**
     * 可购买保险列表
     * @param req
     * @return
     */
    Result<List<OrderInsuranceDTO>> insuranceList(CustomOrderInsuranceListReq req);

    /**
     * 購買保險
     * @param req
     * @return
     */
    Result<OrderBuyInsuranceDTO> buyInsurance(CustomOrderBuyInsuranceReq req);

    /**
     * 保險收款
     * @param req
     * @return
     */
    Result collectInsurance(CustomOrderCollectInsuranceReq req);

    /**
     * 收款
     * @param req
     * @param currentUser
     * @return
     */
    Result add(CustomOrderCollectionAddReq req, TokenUser currentUser);

    /**
     * 更新关联收款记录是否开收据状态
     * @param collectionIdList
     * @param userId
     */
    void batchUpdateIsPrint(List<Long> collectionIdList, Long userId);

    /**
     * 调整项目
     * @param req
     * @return
     */
    Result adjustProject(CustomOrderAdjustProjectReq req);

    /**
     * 计算港币收款金额
     * @param req
     * @return
     */
    Result getHkdAmount(List<GetHkdAmountReq> req);
}
